const http = require('http')

const server = http.createServer((req, res) => {
  // res.setHeader("Content-Type","text/plain")
  res.writeHead(200,{
    "Content-Type":"text/html;charset=utf-8"
  })
  res.end('<h2>Hello Server</h2>')
})

server.listen(8000, ()=> {
  console.log('服务器启动成功');
})